<?php
/**
 * Created by 张彪.
 * User: 小马出行
 * Date: 2018/4/18
 * Time: 11:34
 */
namespace app\admin\model;
use think\Model;
use think\Db;

class UserRechargeModel extends Model
{
    public function getRechargeLog($map,$field='a.*',$flag = true,$page=1,$limit=10)
    {
        return  $flag ? Db::table('xm_user_recharge a')->join('user b','a.uid=b.uid',"LEFT")->where($map)->field($field)->page($page,$limit)->order('money_id desc')->select()
           : Db::table('xm_user_recharge a')->join('user b','a.uid=b.uid',"LEFT")->where($map)->field($field)->find();
    }

}
